<?php
/**
 * Created by PhpStorm
 * User: 龍zero
 * Date: 2022-04-12
 * Time: 9:28
 */

namespace App\Lib\Tools;


use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\ApplicationContext;

class Log
{
    public static function get(string $name = 'cms')
    {
        return ApplicationContext::getContainer()->get(LoggerFactory::class)->get($name);
    }

    public static function init(string $name = 'cms',string $message = ''){
        return ApplicationContext::getContainer()->get(LoggerFactory::class)->make($name)->error($message);
    }

    public static function notice(string $name = 'cms',string $message = ''){
        return ApplicationContext::getContainer()->get(LoggerFactory::class)->make($name)->notice($message);
    }
}